<?php if(isset($user)) {?>
<fieldset>
    <legend>Thông tin của <?php echo $user['User']['username'];?></legend>
    <table id="view-user-form" border="0" width="100%">
        <tr><td colspan="3"><hr /></td></tr>
        <tr>
            <td width="30%"></td>
            <td width="20%"><b>Tên tài khoản</b></td>
            <td><?php echo $user['User']['username'];?></td>
        </tr>
        <tr>
            <td></td>
            <td><b>Email</b></td>
            <td><?php echo $user['User']['email']?></td>
        </tr>
        <tr>
            <td></td>
            <td><b>Số điện thoại</b></td>
            <td><?php echo $user['User']['phone']?></td>
        </tr>
        <tr>
            <td></td>
            <td><b>Ngày sinh</b></td>
            <td><?php echo $user['User']['birthday']?></td>
        </tr>
        <tr><td colspan="3"><hr /></td></tr>
        <?php if($curr_user_id == $user['User']['id']) {?>
        <tr>
            <td></td>
            <td>
            <?php
                echo $this->Form->create('user', array('action' => 'edit', 'type' => 'get'));
                echo $this->Form->end('Sửa thông tin');
            ?>
            </td>
            <td>
            <?php
                echo $this->Form->create('user', array('action' => 'changepass'));
                echo $this->Form->end('Đổi mật khẩu');
            ?>
            </td>
        </tr>
        <tr><td colspan="3" align="center"><?php echo $this->Session->flash();?></td></tr>
        <?php }?>
    </table>
</fieldset>
<?php }?>